package Test5;

public class AsterisksDraw {
	
	public static void main(String[] args){
		String strN = args[1];
		int n;
		
		n = Integer.parseInt(strN);
		
		if (args[0].equals("EquilateralTriangle")){
			EquilateralTriangle(n);
		}else if (args[0].equals("Square")){
			Square(n);
		}else if (args[0].equals("T")){
			T(n);
		}else{
			System.out.println("Form cannot found. Please try again!");
		}
	}
	
	static void EquilateralTriangle (int m){
		
			int spasi;
			int k;
			for(int j=0; j<m; j++){
				spasi=m-j-1;
				for (k=0; k<spasi; k++){
					System.out.print(" ");
				}
				for (int l =0; l<j+1; l++){
					System.out.print("* ");
				}
				System.out.println();
			}
			
		
	}
	static void Square (int m){
		int ukuran = m;
		for (int i=0; i<m; i++){
			for(int j=0; j<m; j++ ){
				System.out.print("*");
			}
			System.out.println();
		}
	}
	static void T (int m){
		int ukuran = m;
		for (int i=0; i<m; i++){
			System.out.print("* ");
		}
		System.out.println();
		for(int i=1; i<=m; i++ ){
			int spasi=m-1;
			for (int j=1; j<=spasi; j++){
				System.out.print(" ");
			}
			System.out.println("*");
		}
	}
}
